import 'package:flutter/material.dart';

class WText extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          centerTitle: true,
          title: Text(
            "文本组件",
            style: TextStyle(color: Colors.white),
          ),
        ),
        body: Padding(
          padding: EdgeInsets.all(10),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: <Widget>[
              Text("文本组件"),
              Container(
                height: 10,
                color: Colors.amberAccent,
              ),
              Text(
                "文件组件",
                style: TextStyle(color: Colors.red, fontSize: 20),
              ),
              SizedBox(
                height: 10,
              ),
              Text(
                '这是一个测试softWarp表示是否自动换行，用法如下的代码例子',
                softWrap: true,
                style: TextStyle(fontSize: 25, fontWeight: FontWeight.w200),
              ),
              SizedBox(
                height: 15,
              ),
              Text(
                '这是一个测试softWarp表示是否自动换行,当设置softWrap=false的时候不显示，当设置overflow属性可以以省略号结尾，例子如下',
                softWrap: false,
                overflow: TextOverflow.ellipsis,
                style: TextStyle(fontSize: 25, fontWeight: FontWeight.w200),
              ),
              SizedBox(
                height: 10,
              ),
              Text(
                "textScaleFactor是文字缩放系数，用法如下",
                textScaleFactor: 1.6,
              )
            ],
          ),
        ));
  }
}
